#include "trackpoint.h"

TrackPoint::TrackPoint(void):
    datetime(), coord(0, 0)
{}

TrackPoint::TrackPoint(const QDateTime& aDateTime, const GeoCoordinates& aCoord):
    datetime(aDateTime), coord(aCoord.GetLatitude(), aCoord.GetLongitude())
{}

TrackPoint::TrackPoint(const QDateTime& aDateTime, const double& aLatitude, const double& aLongitude):
    datetime(aDateTime), coord(aLatitude, aLongitude)
{}

TrackPoint::~TrackPoint()
{}

void TrackPoint::SetCoordinates(const double& aLatitude, const double& aLongitude)
{
    coord.SetLatitude(aLatitude);
    coord.SetLongitude(aLongitude);
}

void TrackPoint::SetCoordinates(const GeoCoordinates& aCoord)
{
    coord = aCoord;
}

GeoCoordinates TrackPoint::GetCoordinates(void) const
{
    return coord;
}

void TrackPoint::SetDateTime(const QDateTime& aDateTime)
{
    datetime = aDateTime;
}

QDateTime TrackPoint::GetDateTime(void) const
{
    return datetime;
}
